import { Action } from "./Action/Action";
import { BehaviourNode } from "./BehaviorNode";

export interface InputFmt {
    status: RunStatus,
    node: BehaviourNode,
}

export enum RunStatus {
    Completed,
    Failure,
    Running,
}

export interface IBehaviourTreeNode {
    status: RunStatus;
    nodeName: string
    enter(): boolean;
    leave(): boolean;
    tick(): RunStatus;
    findNextAction<T extends Action>(): T;
}
// /* 行为节点*/
export interface IActionNode extends IBehaviourTreeNode {
    execute(): void;
}

export interface ICompositeNode extends IBehaviourTreeNode {
    nodeList: IBehaviourTreeNode[];
    addNode(node: IBehaviourTreeNode): void;
    removeNode(node: IBehaviourTreeNode): void;
    HasNode(node: IBehaviourTreeNode): boolean;
}

// /* 选择节点*/
// export interface ISelectorNode extends ICompositeNode {

// }

// /*顺序节点*/
// export interface ISequenceNode extends ICompositeNode {

// }

// /* 平行(并列)节点*/
// export interface IParallelNode extends ICompositeNode {

// }

// /* 装饰结点*/
// export interface IDecoratorNode extends IBehaviourTreeNode {

// }

// /* 条件节点*/
// export interface IConditionNode {
// }
